package com.leyou.order.config;

import com.leyou.order.interceptors.UserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Auther: xiang
 * @Date: 2019/9/2 17:10
 * @Description:
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
   registry.addInterceptor(new UserInterceptor()).addPathPatterns("/order/**");

    }



}